package main

import "fmt"

// 函数的调用
func main() {
	i := max(4, 5)
	fmt.Println("比较大的", i)
	s, t := swap("java", "python")
	fmt.Println(s, t)

	q1, q2 := splitSwap("java", "python")
	fmt.Println(q1,q2)

	num1 := "123456"
	num2 := "456789"

	valueTest(num1,num2)

	fmt.Println("num1=",num1,"num2=",num2)

}

func max(num1, num2 int) int {
	/* 声明局部变量 */
	var result int

	if num1 > num2 {
		result = num1
	} else {
		result = num2
	}
	return result
}

func swap(x, y string) (string, string) {
	return y, x
}

func valueTest(x,y string) (string, string) {
	s := "string"
	x = x + s
	y = s + y
	return x,y
}


func splitSwap(x, y string) (string, string) {

	s := "yihur"
	x = x + s
	y = y + s
	return x, y

}
